//
//  videoTableViewCell.m
//  iNews
//
//  Created by lanou3g on 14-12-5.
//  Copyright (c) 2014年 张在青. All rights reserved.
//

#import "videoTableViewCell.h"

@implementation videoTableViewCell

- (void)dealloc
{
    [_movieView release];
    
    [_titlabel release];
    
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addviews];
    }
    return self;
}


-(void)addviews{
    
  //自定义一个cell
    self.movieView = [[[UIImageView alloc] initWithFrame:CGRectMake(5, 0, 310,150)] autorelease];
    
    //self.movieView.backgroundColor = [UIColor yellowColor];
   
  
   [self.contentView addSubview:self.movieView];
    
    UIImageView *imV = [[[UIImageView alloc] init] autorelease];
   
    imV.frame = CGRectMake(135, 50, 50, 50);
    imV.layer.cornerRadius = 25;
  
    imV.image = [UIImage imageNamed:@"video_play_big@2x.png"];
    imV.backgroundColor = [UIColor blackColor];
    imV.alpha = 0.5;
    [self.contentView addSubview:imV];
    
    
    

    self.titlabel = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.movieView.frame), CGRectGetMaxY(self.movieView.frame), CGRectGetWidth(self.movieView.frame), 20)] autorelease];
    self.titlabel.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:self.titlabel];
    
    
    self.sectiontitle = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.movieView.frame),CGRectGetMaxY(self.titlabel.frame), CGRectGetWidth(self.movieView.frame)- 100, 20)] autorelease];
    [self.contentView addSubview: self.sectiontitle];

    self.sectiontitle.font = [UIFont systemFontOfSize:12];
    self.timelabel = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.sectiontitle.frame) + 10,CGRectGetMinY(self.sectiontitle.frame), 90, 20)] autorelease];
     self.timelabel.font = [UIFont systemFontOfSize:9];
    [self.contentView addSubview:self.timelabel];
    
    
    
}



- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
